﻿<?xml version="1.0" encoding="UTF-8"?>
<!-- 
    (c) 2003-2009 Olivier Giulieri - olivier@evolutility.com 

    This program is open source software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

 -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.evolutility.com" xmlns="http://www.evolutility.com">
	<xs:element name="data">
		<xs:complexType>
			<xs:attribute name="entity" type="xs:string" use="optional" />
			<xs:attribute name="entities" type="xs:string" use="optional" />
			<xs:attribute name="icon" type="xs:string" use="optional" />
			<xs:attribute name="dbcolumnicon" type="xs:string" use="optional" />
			<xs:attribute name="dbcolumnlead" type="xs:string" use="optional" />
			<xs:attribute name="dbcolumnpk" type="xs:string" use="optional" />
			<xs:attribute name="dbtable" type="xs:string" use="required" />
			<xs:attribute name="dbtablecomments" type="xs:string" use="optional" />
			<xs:attribute name="dbtableusers" type="xs:string" use="optional" />
			<xs:attribute name="dbwhere" type="xs:string" use="optional" />
			<xs:attribute name="dborder" type="xs:string" use="optional" />
			<xs:attribute name="dbcommentsformid" type="xs:integer" use="optional" />
			<xs:attribute name="sppaging" type="xs:string" use="optional" />
			<xs:attribute name="spget" type="xs:string" use="optional" />
			<xs:attribute name="splogin" type="xs:string" use="optional" />
			<xs:attribute name="spdelete" type="xs:string" use="optional" />
			<xs:attribute name="userpage" type="xs:string" use="optional" />
			<xs:attribute name="readOnlyCondition" type="xs:string" use="optional" />
			<!--支持如果符合条件，则不能修改。条件格式为：fieldname=value -->

			
		</xs:complexType>
	</xs:element>
	<xs:element name="field">
		<xs:complexType>
			<xs:attribute name="type" use="required">
				<xs:simpleType>
					<xs:restriction base="xs:NMTOKEN">
						<xs:enumeration value="boolean" />
						<xs:enumeration value="date" />
						<xs:enumeration value="datetime" />
						<xs:enumeration value="time" />
						<xs:enumeration value="formula" />
						<xs:enumeration value="email" />
						<xs:enumeration value="url" />
						<xs:enumeration value="lov" />
						<xs:enumeration value="text" />
						<xs:enumeration value="textmultiline" />
						<xs:enumeration value="html" />
						<xs:enumeration value="decimal" />
						<xs:enumeration value="integer" />
						<xs:enumeration value="image" />
						<xs:enumeration value="document" />
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="cssclass" type="xs:string" use="optional" />
			<xs:attribute name="cssclasslabel" type="xs:string" use="optional" />
			<xs:attribute name="dbcolumn" type="xs:string" use="required" />
			<xs:attribute name="dbcolumnicon" type="xs:string" use="optional" />
			<xs:attribute name="dbcolumnread" type="xs:string" use="required" />
			<xs:attribute name="dbcolumnreadlov" type="xs:string" use="optional" />
			<xs:attribute name="dbtablelov" type="xs:string" use="optional" />
			<xs:attribute name="dborderlov" type="xs:string" use="optional" />
			<xs:attribute name="dbwherelov" type="xs:string" use="optional" />
			<xs:attribute name="defaultvalue" type="xs:string" use="optional" />
			<xs:attribute name="dependency" type="xs:string" use="optional" />
			<xs:attribute name="format" type="xs:string" use="optional" />
			<xs:attribute name="height" type="xs:integer" use="optional" default="1" />
			<xs:attribute name="help" type="xs:string" use="optional" />
			<xs:attribute name="id" type="xs:string" use="optional" />
			<xs:attribute name="supportsession" type="xs:string" use="optional" />
			<xs:attribute name="img" type="xs:string" use="optional" />
			<xs:attribute name="imglist" type="xs:string" use="optional" />
			<xs:attribute name="jsdependency" type="xs:string" use="optional" />
			<xs:attribute name="jsvalidation" type="xs:string" use="optional" />
			<xs:attribute name="label" type="xs:string" use="required" />
			<xs:attribute name="labeledit" type="xs:string" use="optional" />
			<xs:attribute name="labellist" type="xs:string" use="optional" />
			<xs:attribute name="link" type="xs:string" use="optional" />
			<xs:attribute name="linklabel" type="xs:string" use="optional" />
			<xs:attribute name="linktarget" type="xs:string" use="optional" />
			<xs:attribute name="maxlength" type="xs:string" use="optional" />
			<xs:attribute name="max" type="xs:string" use="optional" />
			<xs:attribute name="min" type="xs:string" use="optional" />
			<xs:attribute name="optional" type="xs:string" use="optional" />
			<xs:attribute name="readonly" type="xs:integer" use="optional" />
			<xs:attribute name="required" type="xs:integer" use="optional" />
			<xs:attribute name="script" type="xs:string" use="optional" />
			<xs:attribute name="search" type="xs:integer" use="optional" />
			<xs:attribute name="searchlist" type="xs:integer" use="optional" />
			<xs:attribute name="searchadv" type="xs:integer" use="optional" />
			<xs:attribute name="width" type="xs:integer" use="optional" default="100" />
			<xs:attribute name="regexp" type="xs:string" use="optional" />
		</xs:complexType>
	</xs:element>
	<xs:element name="form">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="data" minOccurs="1" maxOccurs="1" />
				<xs:element ref="tab" minOccurs="0" maxOccurs="12" />
				<xs:element ref="panel" minOccurs="1" maxOccurs="unbounded" />
				<xs:element ref="panel-details" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="queries" minOccurs="0" maxOccurs="1" />
			</xs:sequence>
			<xs:attribute name="title" type="xs:string" use="optional" />
			<xs:attribute name="label" type="xs:string" use="optional" />
			<xs:attribute name="description" type="xs:string" use="optional" />
			<xs:attribute name="version" type="xs:string" use="optional" />
		</xs:complexType>
	</xs:element>
	<xs:attributeGroup name="_holder_common">
		<xs:attribute name="id" type="xs:string" use="optional" />
		<xs:attribute name="cssclass" type="xs:string" use="optional" />
		<xs:attribute name="cssclasslabel" type="xs:string" use="optional" />
		<xs:attribute name="label" type="xs:string" use="required" />
		<xs:attribute name="width" type="xs:string" use="optional" />
		<xs:attribute name="img" type="xs:string" use="optional" />
		<xs:attribute name="help" type="xs:string" use="optional" />
		<xs:attribute name="optional" type="xs:string" use="optional" />
	</xs:attributeGroup>
	<xs:element name="panel">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="field" minOccurs="1" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attributeGroup ref="_holder_common" />
		</xs:complexType>
	</xs:element>
	<xs:element name="tab">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="panel" minOccurs="1" maxOccurs="unbounded" />
				<xs:element ref="panel-details" minOccurs="0" maxOccurs="1" />
			</xs:sequence>
			<xs:attributeGroup ref="_holder_common" />
		</xs:complexType>
	</xs:element>
	<xs:element name="panel-details">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="field" minOccurs="1" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attributeGroup ref="_holder_common" />
			<xs:attribute name="dbcolumndetails" type="xs:string" use="optional" />
			<xs:attribute name="dbtabledetails" type="xs:string" use="optional" />
			<xs:attribute name="panelid" type="xs:string" use="optional" />
			<xs:attribute name="dbmaxrow" type="xs:string" use="optional" />
			<xs:attribute name="linknew" type="xs:string" use="optional" />
			<xs:attribute name="jsnew" type="xs:string" use="optional" />
			<xs:attribute name="jsdelete" type="xs:string" use="optional" />
		</xs:complexType>
	</xs:element>
	<xs:element name="header">
		<xs:complexType mixed="true" />
	</xs:element>
	<xs:element name="footer">
		<xs:complexType mixed="true" />
	</xs:element>
	<xs:element name="queries">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="query" minOccurs="1" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="header" type="xs:string" use="optional" />
			<xs:attribute name="label" type="xs:string" use="optional" />
		</xs:complexType>
	</xs:element>
	<xs:element name="query">
		<xs:complexType>
			<xs:attribute name="id" type="xs:string" use="optional" />
			<xs:attribute name="url" type="xs:string" use="required" />
			<xs:attribute name="label" type="xs:string" use="required" />
			<xs:attribute name="dbwhere" type="xs:string" use="required" />
			<xs:attribute name="dborder" type="xs:string" use="optional" />
		</xs:complexType>
	</xs:element>
</xs:schema>